import { API, Tag } from '../api'

/** 获取标签 */
export const getTag = async (tag: string) =>
	(await API.getTag([['name', 0, tag, 0]]))[1]

/** 获取热门标签 */
export const getHotTags = async (count: number) =>
	<Tag[]>(await API.getTag(void 0, "count desc,random()", 0, count)).slice(1)
